package model.entity;

import java.util.ArrayList;
import java.util.List;


/**
 * Encapsula os votos do eleitor.
 * @author Tiago
 */
public class Vote {

	private List<Integer> votes;
	
	/**
	 * Construtor.
	 */
	public Vote() {
		this.votes = new ArrayList<Integer>();
	}
	
	/**
	 * @param vote Voto a ser adicionado.
	 */
	public void addVote(Integer vote) {
		this.votes.add(vote);
	}
	
	/**
	 * @return votos salvos.
	 */
	public List<Integer> getVotes() {
		return this.votes;
	}
	
	@Override
	public String toString() {
		String strReturn = "";
		for(Integer vote : this.votes) {
			strReturn += vote + ";";
		}
		
		return strReturn;
	}
}
